<template>
    <p ref="hello">{{ count }}</p>
    <button @click="count++">修改count</button>

</template>

<script setup>
    import {onMounted, onUpdated} from 'vue'
    import {ref} from 'vue'

    console.log('created......')


    onMounted(() => {
        console.log('mounted......')


        console.log(hello.value)
    })


    onUpdated(() => {
        console.log('updated......')
    })

    const count = ref(1)

    // vue2
    // this.$refs.hello

    // vue3
    const hello = ref(null)
    // console.log(hello.value)

   
</script>

<style scoped>

</style>